/*
    获取get请求与post请求页面的响应
*/

#include "cgic.h"

int cgiMain()
{
    //声明数组存储参数
    char name[128];
    char sex[20];
    char age[50];

    cgiFormString("name",name,128);
    cgiFormString("sex",sex,20);
    cgiFormString("age",age,50);
    
    cgiHeaderContentType("text/html");
    fprintf(cgiOut, "<HTML><HEAD><meta charset='UTF-8'>\n");
    fprintf(cgiOut, "<TITLE>响应客户端版本</TITLE></HEAD>\n");
    //把请求体返回页面
    fprintf(cgiOut, "<BODY><H1>%s,%s,%s</H1></BODY>\n",name, sex, age);
    fprintf(cgiOut, "</HTML>\n");

    return 0;
}
